/**
 * 功能:获取用户微博主页相关的信息
 * 创建日期: 2012-03-19
 * 创建人: 全轩
 * 功能修正说明:
 * 		
 */
if(!this.StatusesInfo)
{
	this.StatusesInfo = {};
}

(function(){
	
	/*
	 * 获取微薄主页默认数据
	 */
	if(typeof StatusesInfo.GetData !== 'function')
	{
		StatusesInfo.GetData = function(pagesize,callback)
		{
			SinaAPI.GetHomeLine(pagesize,callback);
		}
	}
	
	/*
	 * 获取下一页最新数据
	 */
	if(typeof StatusesInfo.Get_Data_Next_Page !== 'function')
	{
		StatusesInfo.Get_Data_Next_Page = function(max_id,pagesize,callback)
		{
			SinaAPI.GetHomeLine_Next_Page(max_id,pagesize,callback);
		}
	}
	
	/*
	 * 获取前一页数据
	 */
	if(typeof StatusesInfo.Get_Data_Prev_Page !== 'function')
	{
		StatusesInfo.Get_Data_Prev_Page = function(min_id,pagesize,callback)
		{
			SinaAPI.GetHomeLine_Prev_Page(min_id,pagesize,callback);		
		}
	}
	
	/*
	 * 存储本次获取到的微薄信息
	 */
	if(typeof StatusesInfo.RecordStatuses !== 'function')
	{
		StatusesInfo.RecordStatuses = function(data)
		{
			//删除已经存在的记录
			DAL.Del(DataBase.tableNames.tweet,null);
			
			//记录新的微薄信息  //retweeted_status
			DAL.Add(DataBase.tableNames.tweet,data,['created_at','id','tweet_text','source','favorited','truncated','in_reply_to_status_id','in_reply_to_user_id','in_reply_to_screen_name','geo','mid','reposts_count','comments_count','annotations','user']);
		}
	}
	
}())
//SinaApp.StatusesInfo = StatusesInfo;